import fetch from 'common/src/utils/fetch'

/**
 *学院考场明细表
 */
function getCollegeExaminationRoomPage(data) {
    return fetch({
        url: '/api/electionservice/common/fxExamExportDetail/getCollegeExaminationRoomPage',
        method: 'post',
        data
    })
}

/**
 *学院考场明细表(导出)
 */
function exportCollegeExaminationRoomPage(data) {
    return fetch({
        url: '/api/electionservice/common/fxExamExportDetail/exportCollegeExaminationRoomPage',
        method: 'post',
        data
    })
}

/**
 *学院考场明细表(勾选导出)
 */
function exportSelectedCollegeExaminationRoomPage(data) {
    return fetch({
        url:
            '/api/electionservice/common/fxExamExportDetail/exportSelectedCollegeExaminationRoomPage',
        method: 'post',
        data
    })
}

/**
 *学院考场明细表-监考+考场维度(导出)
 */
function exportCollegeExaminationRoomPageExp(data) {
    return fetch({
        url:
            '/api/electionservice/common/fxExamExportDetail/exportCollegeExaminationRoomPageExp',
        method: 'post',
        data
    })
}

/**
 * 获取key
 */
function exportReport(key) {
    return fetch({
        url: '/api/electionservice/undergraduateExamDownload/result/' + key,
        method: 'get'
    })
}

/**
 * 获取key
 */
function exportStatusObs(key) {
  return fetch({
    url: '/api/electionservice/undergraduateExamDownload/resultObs/' + key,
    method: 'get'
  });
}

/**
 * 导出
 * @param {Object} data
 */
function exportAcdemicDeanListZip(data,isPdf) {
  return fetch({
    url: '/api/electionservice/common/fxExamQuery/exportAcdemicDeanListZip?isPdf='+isPdf,
    method: 'post',
    data
  })
}

/**
 * 一键导出签到表
 * @param {Object} data
 */
function exportPrintingList(data) {
  return fetch({
    url: '/api/electionservice/common/fxExamQuery/exportPrintingList',
    method: 'post',
    data
  })
}

export default {
    getCollegeExaminationRoomPage: getCollegeExaminationRoomPage,
    exportSelectedCollegeExaminationRoomPage: exportSelectedCollegeExaminationRoomPage,
    exportCollegeExaminationRoomPage: exportCollegeExaminationRoomPage,
    exportCollegeExaminationRoomPageExp: exportCollegeExaminationRoomPageExp,
    exportReport: exportReport,
    exportStatusObs : exportStatusObs,
    exportPrintingList : exportPrintingList,
    exportAcdemicDeanListZip : exportAcdemicDeanListZip,
}
